package com.example.sys.pay.service;

import com.example.core.po.BasePo;
import com.example.core.service.BaseService;
import com.example.sys.pay.po.SysPay;
import com.example.sys.pay.vo.SysPayVo;
import com.lly835.bestpay.enums.BestPayTypeEnum;
import com.lly835.bestpay.model.PayResponse;
import com.lly835.bestpay.model.RefundResponse;

public interface SysPayService extends BaseService<SysPay, SysPayVo> {

    /****
     * 发起支付
     * @param po
     * @param payType
     * @param amount
     * @return
     */
    public PayResponse apply(BasePo po, BestPayTypeEnum payType, Double amount);

    /***
     * 发起支付
     * @return
     * @throws Exception
     */
    public PayResponse apply(BestPayTypeEnum payType, String orderId, Double amount);

    /***
     * 发起退款
     * @param orderId
     * @return
     * @throws Exception
     */
    public RefundResponse refund(String orderId) throws Exception;


    /***
     *
     * 支付回调
     * @param notifyData
     * @return
     * @throws Exception
     */
    public String notify(String notifyData) throws Exception;
}
